package com.csdj.game.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * 错误代码常量
 * author:cloud
 * date:2021/3/31 0031
 **/
public class ResultCodeContant {
    //用户存在
    public final static int USER_EXISTS = 450;
    //成功
    public final static int SUCCESS = 200;
    //权限不足
    public final static int ROLE_ERROR = 403;
    //操作失败
    public final static int FAIL = 303;
    //密码格式不正确
    public final static int PASSWORD_FORMAT_ERROR = 410;
    //没有提交注册数据
    public final static int NO_REG_DATA = 451;
    //错误页面消息
    public final static String ERROR_VIEW_MSG = "errMsg";
    //密码最小长度
    public final static int MIN_PASSWROD_LENGTH = 6;


    public static Map<Integer,String> errMsgMap = new HashMap<>();
    static{
        errMsgMap.put(450,"用户已经存在");
        errMsgMap.put(200,"请求成功");
        errMsgMap.put(403,"权限不足");
        errMsgMap.put(303,"操作失败");
        errMsgMap.put(410,"密码格式不正确");
        errMsgMap.put(451,"没有提交注册数据");
    }
}
